//
//  CLBaseModifyViewController.m
//  CarLifes
//
//  Created by yu on 2017/6/25.
//  Copyright © 2017年 jpas. All rights reserved.
//

#import "CLBaseModifyViewController.h"

@interface CLBaseModifyViewController ()

@end

@implementation CLBaseModifyViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    [self setWhiteNavigationBar];
    [self setLeftImageNamed:@"back_gray" action:@selector(returnAction)];
    [self setRightItemTitle:@"提交" titleColor:kBaseColor action:@selector(submitAction)];
    
    [self setupSubviews];
}

- (void)submitAction
{
    
}

- (void)setupSubviews
{
    self.view.backgroundColor = [UIColor groupTableViewBackgroundColor];
    
    // TextField 背景
    UIView *backgroundView = [[UIView alloc] init];
    backgroundView.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:backgroundView];
    backgroundView.sd_layout
    .rightEqualToView(self.view)
    .leftEqualToView(self.view)
    .topSpaceToView(self.view, 10)
    .heightIs(45);
    
    // TextField
    UITextField *textField = [[UITextField alloc] init];
    self.textField = textField;
    textField.textColor = kTextBlackColor;
    textField.backgroundColor = [UIColor whiteColor];
    textField.clearButtonMode = UITextFieldViewModeWhileEditing;
    [backgroundView addSubview:textField];
    
    textField.sd_layout
    .leftSpaceToView(backgroundView, 10)
    .rightSpaceToView(backgroundView, 10)
    .centerYEqualToView(backgroundView)
    .heightIs(40);
    
}

- (void)returnAction {
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault animated:YES];
}

- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



@end
